############################################################

# Set the base image to Ubuntu

FROM ubuntu:20.04

# Working dir
WORKDIR /data

# Update the repository and install software
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y git && apt-get clean && rm -rf /var/lib/apt/lists/*

RUN mkdir /dubhe-code && cd /dubhe-code && git clone https://gitee.com/zhijiangtianshu/Dubhe.git

# Copy initilize file
COPY init_storage.sh ./

# Do init work for image
RUN chmod +x init_storage.sh

# Init storage for Dubhe
CMD ["/data/init_storage.sh"]

